package com.ruicar.afs.cloud.account.common.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruicar.afs.cloud.account.enums.rules.RuleItemType;
import com.ruicar.afs.cloud.common.core.entity.BaseEntity;
import lombok.Data;

/**
 * @author infinity
 * @version 1.0
 * @date 2020/7/1 16:48
 */
@TableName("voucher_rule_item")
@Data
public class VoucherRuleItem extends BaseEntity<VoucherRuleItem> {
    @JsonSerialize(using= ToStringSerializer.class)
    /** 规则id */
    private Long ruleId ;
    /** express-表达式类型
     */
    private RuleItemType itemType ;
    /** 配置项中文 */
    private String itemLabel ;
    /** 配置项符号 */
    private String itemKey ;
    /** 是否为非 */
    private boolean itemNot ;
    /** 配置项顺序 */
    private Integer itemSortOrder ;
    /** 配置项父id;配置项父id
     如果为父配置项为顶级则父id为0 */
    @JsonSerialize(using= ToStringSerializer.class)
    private Long parentId ;
}
